<template>
  <div class="d-date">
    <slot :data="date"></slot>
  </div>
</template>

<script setup lang="ts">
import calendarConverter from 'js-calendar-converter';
import { ref } from 'vue';
const $props = defineProps<{
  yyyy: number;
  MM: number;
  dd: number;
}>();
const date = ref(converter());

function converter() {
  return calendarConverter.solar2lunar($props.yyyy, $props.MM, $props.dd);
}
</script>

<style lang="scss">
.d-date {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100%;
}
</style>
